package com.xpf.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore      //swagger2忽略此controller
@RestController //所有请求都是json对象
public class HelloController {

    final static Logger logger = LoggerFactory.getLogger(HelloController.class);

    @GetMapping("/hello")
    public Object hello(){

        logger.debug("debug: hello~");
        logger.info("info: hello~");
        logger.warn("warn: hello~");
        logger.error("error: hello~");

        return "hello world!";
    }

    @GetMapping("/wanwan")
    public Object wanwan(){

        return "晚晚同学在做咩呀";
    }

    @GetMapping("/geli")
    public Object geli(){

        return "7+7豪华套餐";
    }
}
